package com.tool.emulator.mos6502;

/**
 * C6502.java @author tl 2011-6-18
 */
public interface Constants6502 {
	public static final long CPU_FREQ = 1020500L;
	public static final int SP_OFFSET = 0x100;
	public static final int UNSUPPORTED_INSTR_CYCLES = 2;
	public static final boolean DEAD_LOOP_WHEN_UNSUPPORTED_CODE = true;
	public static final int NMI_ADDR = 0xFFFA;
	public static final int RESET_ADDR = 0xFFFC;
	public static final int IRQ_ADDR = 0xFFFE;

	public static final int FLAG_N = 1 << 7;
	public static final int FLAG_V = 1 << 6;
	public static final int FLAG_REVERSE = 1 << 5;
	public static final int FLAG_B = 1 << 4;
	public static final int FLAG_D = 1 << 3;
	public static final int FLAG_I = 1 << 2;
	public static final int FLAG_Z = 1 << 1;
	public static final int FLAG_C = 1 << 0;

	public static final int IR_RESET = 1 << 16; //边缘触发
	public static final int IR_NMI = 1 << 17; //边缘触发
	public static final int IRQ_MASK = 0xffff; //低电平触发？不自动复位？

}
